import networkx as nx
import pylab as plt
import numpy as np

G = nx.DiGraph()
#List = [(0,1,1),(0,2,12),(1,2,9),(1,3,3),(2,4,5),(3,2,4),(3,4,13),(3,5,15),(4,5,4)]
List = [(0,1),(0,2),(1,2),(1,3),(2,4),(3,2),(3,4),(3,5),(4,5)]
G.add_nodes_from(range(6))
G.add_edges_from(List)

plt.rc('font',size = 16)
pos = nx.shell_layout(G)
nx.draw(G, pos, with_labels = True, font_weight = 'bold', node_color = 'r')
plt.savefig('DiGraph.png',dpi = 500)
plt.show()

